﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL.Model;
using DAL.Helpers;
using System.Configuration;
using System.Data.SqlClient;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.ConnectionStrings["SqlServices"].ConnectionString;

            SqlCommand cmd = StoredProceduresHelper.ReportDirezionale(null, null, null, null, null, null, null, null, null, null, null);

            using (StoreProcedureExecutor spe = new StoreProcedureExecutor(cmd))
            {
                var pp = spe.ExecuteQueryObjectResult<ReportDirezionale_Result, GestionePolveriEntities>();

                long nn = pp.Count();
            }
            
        }
    }
}
